package io.coding.controller;

import io.coding.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by Administrator on 2014/8/19.
 */
@Controller
@RequestMapping("t")
public class TestController {
    @Autowired
    private TestService testService;

    @RequestMapping("test")
    public  String test(Model model){
        System.out.println();
        model.addAttribute("test",testService.findAll().get(0).getCount());
        return "test";
    }
}
